package com.wenjiang.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.time.LocalDateTime;

@Document(indexName = "good")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class GoodIndex {

    @Id
    private Long goodId;

    @Field(type = FieldType.Text,analyzer = "ik_max_word" )
    private String goodName;
    @Field(type = FieldType.Text,index = false)
    private String goodImgUrl;
    @Field(type = FieldType.Text,index = true)
    private String goodInfo;
    @Field(type = FieldType.Double,index = true)
    private Double goodPrice;
    @Field(type = FieldType.Double,index = true)
    private Double goodNowPrice;
    @Field(type = FieldType.Long,index = false)
    private Long   goodSell;
    @Field(type = FieldType.Text,index = false)
    private LocalDateTime goodCreateTime;

}
